projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1eaf780
)
dm: pci: Avoid setting a PCI region that has 0 size
author
Bin Meng
<
[email protected]
>
Tue, 27 Mar 2018 07:46:06 +0000
(
00:46
-0700)
committer
Bin Meng
<
[email protected]
>
Fri, 30 Mar 2018 08:05:08 +0000
(16:05 +0800)
It makes no sense to set a PCI region that has 0 size.
Signed-off-by: Bin Meng <
[email protected]
>
Reviewed-by: Simon Glass <
[email protected]
>
drivers/pci/pci-uclass.c
patch
|
blob
|
history
diff --git
a/drivers/pci/pci-uclass.c
b/drivers/pci/pci-uclass.c
index 9d51236770ff341848efe2b3f3c3828b07ef6c13..a2e829608a34f25c7d45673991a764ae523bc5ee 100644
(file)
--- a/
drivers/pci/pci-uclass.c
+++ b/
drivers/pci/pci-uclass.c
@@
-897,8
+897,9
@@
static int decode_regions(struct pci_controller *hose, ofnode parent_node,
#endif
if (gd->pci_ram_top && gd->pci_ram_top < base + size)
size = gd->pci_ram_top - base;
- pci_set_region(hose->regions + hose->region_count++, base, base,
- size, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
+ if (size)
+ pci_set_region(hose->regions + hose->region_count++, base,
+ base, size, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
#endif
return 0;